package com.naiterui.ehp.bs.doctor.fegin;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.ehp.bp.bo.recommend.DrBaseBusinessDataBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomDetailBO;
import com.naiterui.ehp.bp.bo.recommend.SuperviseDiagnosisBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.doctor.vo.PrescriptionVO;
import com.naiterui.ehp.bs.doctor.vo.SuperviseRecomVO;

/**
 * @author guoyongxiang
 * @date 2019-06-28 15:26
 * @since 1.0.0
 */
@FeignClient(name = "adTuijian", url = "${ehp.domain.tuijian}", configuration = FeignConfiguration.class)
public interface RecomFeginClient {

    @PostMapping("inner/dr/recom/details")
    List<MedicationRecomDetailBO> getRecomDetails(@RequestParam("recommendIds") String recommendIds);

    @PostMapping("inner/dr/recom/specifyday")
    List<MedicationRecomBO> getSpecifydayRecom(@RequestParam("recommendIds") String recommendIds,
        @RequestParam("start") String start, @RequestParam("end") String end);

    /**
     * 修改电子签名通知手机号
     *
     * @param doctorId
     * @param phone
     *
     * @return
     */
    @PostMapping("inner/dr/recom/esign/phone/modify")
    void esignPhoneModify(@RequestParam("doctorId") Long doctorId,
                          @RequestParam("phone") String phone) throws BusinessException;

    @GetMapping("inner/doctor/business/data")
    DrBaseBusinessDataBO getDrBaseBusinessData(@RequestParam("doctorId") Long doctorId) throws BusinessException;

    /**
     * 获取患者诊断信息
     * @throws BusinessException
     */
    @PostMapping("inner/diagnosis/patient/lastest/get")
    List<String> getDiagnosis(@RequestParam("doctorId") Long doctorId, @RequestParam("inquirerId") Long inquirerId) throws BusinessException;

    @GetMapping("inner/supervise/recom/get")
    List<SuperviseRecomVO> sessionRecoms(@RequestParam("sessionId") Long sessionId);

    @PostMapping("inner/diagnosis/name/list")
    List<SuperviseDiagnosisBO> diagnosiss(@RequestBody List<String> names);

    @GetMapping("inner/supervise/recom/prescription")
    PrescriptionVO getPrescription(@RequestParam("sessionId") Long sessionId);

    /**
     * 获取处方状态
     * 
     * @param recomIds
     * @return
     */
    @PostMapping("inner/dr/recom/getRecomStatusMap")
    Map<Long, Integer> getRecomStatusMap(@RequestBody Set<Long> recomIds);

    @PostMapping("inner/supervise/recom/diagnosis")
    Map<Long, Set<String>> recomDiagnosis(@RequestParam("sessionIds") String sessionIds,
        @RequestParam("recomIds") String recomIds);
}
